fc72340e24eef3a24c30a9ce74eed3761dc34660,advanced/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLog.java,XaLogicalLog,getCommittedTransaction,#number#,1119
Before Change
List<LogEntry> logEntryList = extractLogEntryList( txId );
// return wrapInMemoryLogEntryRepresentation( logEntryList );
writeOutLogEntryList( logEntryList, txFile, true );
return new RandomAccessFile( txFile, "r" ).getChannel();
}
public static final int MASTER_ID_REPRESENTING_NO_MASTER = -1;
After Change
return new RandomAccessFile( txFile, "r" ).getChannel();
}
Pair<List<LogEntry>, Boolean> logEntryList = extractLogEntryList( txId );
if ( logEntryList.other() )
{
// It was apparently hard to find (linear search in log(s)), perhaps
// a request from a slave which was way behind (more than the
// start-position-cache capacity). So store it cached on disk.
writeOutLogEntryList( logEntryList.first(), txFile, true );
return new RandomAccessFile( txFile, "r" ).getChannel();
}
else
{
// It was found easily with a start position from the start-position-cache
// so just make an in-memory byte representation of it and send.
return wrapInMemoryLogEntryRepresentation( logEntryList.first() );
}
}